package uk.co.droidinactu.sony.prst1.home.view;

import uk.co.droidinactu.sony.prst1.home.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.GridView;

public final class BookGridView extends GridView {

	private Bitmap background = null;

	public BookGridView(final Context context, final AttributeSet attrs) {
		super(context, attrs);
		// this.background = BitmapFactory.decodeResource(this.getResources(),
		// R.drawable.wood_bckgnd);
		background = BitmapFactory.decodeResource(getResources(), R.drawable.underline);
	}

	@Override
	protected void dispatchDraw(final Canvas canvas) {
		// final int count = this.getChildCount();
		// final int top = count > 0 ? this.getChildAt(0).getTop() : 0;
		// final int backgroundWidth = this.background.getWidth();
		// final int backgroundHeight = this.background.getHeight();
		// final int width = this.getWidth();
		// final int height = this.getHeight();
		//
		// for (int y = top; y < height; y += backgroundHeight) {
		// for (int x = 0; x < width; x += backgroundWidth) {
		// canvas.drawBitmap(this.background, x, y, null);
		// }
		// }
		super.dispatchDraw(canvas);
	}

}